package com.emcom.gotour.mvc.message;

import javax.servlet.http.HttpServletRequest;

import org.springframework.context.MessageSource;

import com.emcom.gotour.utils.LocaleUtils;

public enum GlobalMessage {
	Operation("operation"),
	Insert("insert"),
	Delete("delete"),
	Update("update"),
	Query("query"),
	InputDate("inputDate"),
	UpdateDate("updateDate"),
	Upload("upload");
	private String message;
	private GlobalMessage(String message) {
		this.message = message;
	}
	public String value(HttpServletRequest request, MessageSource messageSource) {
		return messageSource.getMessage(message, null, LocaleUtils.getLocale(request));
	}
}
